package org.come.MountShouHu;

import come.tool.JDialog.TiShiChuLi;
import org.come.Frame.ZhuFrame;
import org.come.entity.Goodstable;
import org.come.socket.Agreement;
import org.come.socket.SendMessageUntil;
import org.come.until.GoodsListFromServerUntil;

public class ShouHuDiaglog implements TiShiChuLi {
@Override
public void tipBox(boolean p0, Object p1) {
     if (p0){
		 Goodstable goodstable=(Goodstable) p1;
		 if (goodstable!=null){
		       if (goodstable.getGoodlock()!=0){
				   ZhuFrame.getZhuJpanel().addPrompt("此物品已被加锁");
		       	return;
			   }
			 final String sendmes = Agreement.getAgreement().userAgreement(goodstable.getRgid().toString());
			 SendMessageUntil.toServer(sendmes);
			 GoodsListFromServerUntil.shouhu(goodstable.getRgid().intValue());
			 goodstable.goodxh(goodstable.getUsetime());
			 ShouhuPackJframe.getShouhuPackJframe().getShouhuPackJpanel().getGoodstableList().removeIf(p->p.getUsetime()<=0);
			 ShouhuPackJframe.getShouhuPackJframe().getShouhuPackJpanel().updata();
			 
			
		 }
   
	 }
}
}
